<#macro masterPage title="" css=[] js=[] initType="">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
      <!-- HTTP 1.1 -->
      <meta http-equiv="Cache-Control" content="no-store"/>
      <!-- HTTP 1.0 -->
      <meta http-equiv="Pragma" content="no-cache"/>
      <!-- Prevents caching at the Proxy Server -->
      <meta http-equiv="Expires" content="0"/>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	  
	  <link type="text/css" rel="stylesheet" href="${base}/styles/common.css" />
      <link type="text/css" rel="stylesheet" href="${base}/styles/styles.css" />
      <link type="text/css" rel="stylesheet" href="${base}/styles/form.css" />
      <link type="text/css" rel="stylesheet" href="${base}/styles/playlist.css" />
      
      <#list css as cssFile>   		
      	  <style type="text/css" media="all">@import ${base}/${cssFile};</style>
      </#list>

      <script type="text/javascript" src="${base}/scripts/jquery/jquery.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/bgiframe.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.dimensions.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.metadata.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.ajaxQueue.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.delegate.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/autocomplete.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.drag.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.form.js"></script>
      <script type="text/javascript" src="${base}/scripts/jquery/jquery.validate.js"></script>
      
      <script type="text/javascript" src="${base}/scripts/common.js"></script>
      <script type="text/javascript" src="${base}/scripts/template.js"></script>
      <script type="text/javascript" src="${base}/scripts/menu.js"></script>
      <script type="text/javascript" src="${base}/scripts/dialog.js"></script>
      
      <#if initType == "main">
          <script type="text/javascript" src="${base}/scripts/main.js"></script>
      <#elseif initType == "playlist">
          <script type="text/javascript" src="${base}/scripts/playlist.js"></script>
      <#else>
      </#if>
      
      <!-- jquery plugins goes here -->
      <!-- end of jquery plugins -->
      <#list js as jsFile>   		
		  <script type="text/javascript" src="${base}/${jsFile}"></script>
      </#list>
      <title>${title} | ShareTime System</title>
      
      <!-- 在此切换初始化代码 -->
      <script type="text/javascript">
      	$(document).ready(function(){
      		$.sharetime.onReady();
      		<#if initType == "main">
      			
      		<#elseif initType == "playlist">
      			$.sharetime.playlist.init();
      		<#else>
      			<!-- do nothing -->
      		</#if>
      	});
      </script>
      
  </head>
  <body>
      <@ui.header/>
      <#nested/>
      <@ui.footer/>
      <#include "../includes/common.ftl">
      <#include "../includes/templates.ftl" />
  </body>
</html>

</#macro>